Make bits from my last commit are conditionally compiled only if cups 1.2
authorJohn Palmieri <johnp@src.gnome.org>
Tue, 18 Jul 2006 21:47:04 +0000 (21:47 +0000)
committerJohn Palmieri <johnp@src.gnome.org>
Tue, 18 Jul 2006 21:47:04 +0000 (21:47 +0000)
* modules/printbackends/cups/gtkprintbackendcups.c:
  Make bits from my last commit are conditionally compiled
  only if cups 1.2 is available.

ChangeLog
ChangeLog.pre-2-10
modules/printbackends/cups/gtkprintbackendcups.c

index 3dc1b09f7c98c46506837b8687c4361221979bcf..c36dd0b295f35c3e2bfb3a8fc6158d3de7ae6a89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2006-07-19  John (J5) Palmieri  <johnp@redhat.com>
+2006-07-18  John (J5) Palmieri  <johnp@redhat.com>
+
+       * modules/printbackends/cups/gtkprintbackendcups.c:
+       Make bits from my last commit are conditionally compiled
+       only if cups 1.2 is available. 
+
+2006-07-18  John (J5) Palmieri  <johnp@redhat.com>
 
        * gtk/gtkprinteroption.h:
        * gtk/gtkprinteroptionwidget.c:
index 3dc1b09f7c98c46506837b8687c4361221979bcf..c36dd0b295f35c3e2bfb3a8fc6158d3de7ae6a89 100644 (file)
@@ -1,4 +1,10 @@
-2006-07-19  John (J5) Palmieri  <johnp@redhat.com>
+2006-07-18  John (J5) Palmieri  <johnp@redhat.com>
+
+       * modules/printbackends/cups/gtkprintbackendcups.c:
+       Make bits from my last commit are conditionally compiled
+       only if cups 1.2 is available. 
+
+2006-07-18  John (J5) Palmieri  <johnp@redhat.com>
 
        * gtk/gtkprinteroption.h:
        * gtk/gtkprinteroptionwidget.c:
index bcaf2561d037093cd14b13b32229e77ba7b6d323..722dcb03427a885342e19c8ebba9161226dd4878 100644 (file)
@@ -1824,6 +1824,7 @@ available_choices (ppd_file_t     *ppd,
   return option->num_choices - num_conflicts + add_auto;
 }
 
+#if HAVE_CUPS_API_1_2
 static GtkPrinterOption *
 create_pickone_option_custom (ppd_file_t   *ppd_file,
                              ppd_option_t *ppd_option,
@@ -1923,6 +1924,7 @@ create_pickone_option_custom (ppd_file_t   *ppd_file,
 
   return option;
 }
+#endif /* HAVE_CUPS_API_1_2 */
 
 static GtkPrinterOption *
 create_pickone_option (ppd_file_t   *ppd_file,
@@ -2016,21 +2018,25 @@ handle_option (GtkPrinterOptionSet *set,
 {
   GtkPrinterOption *option;
   char *name;
-  ppd_coption_t *coption;
+
+#ifdef HAVE_CUPS_API_1_2
+  ppd_coption_t *coption = NULL;
+  coption = ppdFindCustomOption (ppd_file, ppd_option->keyword);
+#endif
 
   if (STRING_IN_TABLE (ppd_option->keyword, cups_option_blacklist))
     return;
-  
-  name = get_option_name (ppd_option->keyword);
 
-  coption = ppdFindCustomOption (ppd_file, ppd_option->keyword);
+  name = get_option_name (ppd_option->keyword);
 
   option = NULL;
   if (ppd_option->ui == PPD_UI_PICKONE)
     {
+#ifdef HAVE_CUPS_API_1_2
       if (coption)
         option = create_pickone_option_custom (ppd_file, ppd_option, coption, name);
       else
+#endif
         option = create_pickone_option (ppd_file, ppd_option, name);
     }
   else if (ppd_option->ui == PPD_UI_BOOLEAN)